Coalgebraic Update Lenses
نویسندگان
چکیده
O’Connor [6] made the simple but very useful observation with deep consequences that the (very well-behaved) lenses à la Foster et al. [3] are nothing but coalgebras of the array comonads of Power and Shkaravska [7]. The put operation in these lenses is quite rigid in that a whole new view is merged into the source, there is no flexibility for speaking about small changes to the view. We advocate a generalization that is as simple as O’Connor’s, but offers also this flexibility. The idea is to introduce updates (or changes, deltas, edits) that can be composed and applied to views. The generalization derives from the work on directed containers of Ahman et al. [1]. A lens in our generalized sense—an update lens—is parameterized by a fixed set S (of views), a monoid (P, o,⊕) (of updates) and an action ↓ of the monoid on the set (describing the outcome of applying any given update on any given view). These data, sometimes collectively called an act, define a comonad (D, ε, δ) by DX = S × (P → X). We define an update lens to be a coalgebra of this comonad. This is the same as having a set X and maps lkp : X → S and upd : X × P → X satisfying the conditions
منابع مشابه
Coalgebraic Epistemic Update Without Change of Model
We present a coalgebraic semantics for reasoning about information update in multi-agent systems. The novelty is that we have one structure for both states and actions and thus our models do not involve the ”change-of-model” phenomena that arise when using Kripke models. However, we prove that the usual models can be constructed from ours by categorical adjunction. The generality and abstractio...
متن کاملRelating Algebraic and Coalgebraic Descriptions of Lenses
Lenses are a heavily studied form of bidirectional transformation, with diverse applications including database view updating, software development and memory management. Previous work has explored lenses category-theoretically, and established that the category of lenses for a fixed ‘view’ V is, up to isomorphism, the category of algebras for a particular monad on set/V . It has recently been ...
متن کاملLenses and View Update Translation
We draw precise connections between lenses and some “classical” structures studied in the context of the view update translation problem: the notion of view update under a constant complement of Bancilhon and Spyratos and the dynamic views of Gottlob, Paolini, and Zicari.
متن کاملComposing Least-change Lenses
Non-trivial bidirectional transformations (BXs) are inherently ambiguous, as there are in general many different ways to consistently translate an update from one side to the other. Existing BX languages and frameworks typically satisfy fundamental first principles which ensure acceptable and stable (well-behaved) translation. Unfortunately, these give little insight about how a particular upda...
متن کاملON ALGEBRAIC AND COALGEBRAIC CATEGORIES OF VARIETY-BASED TOPOLOGICAL SYSTEMS
Motivated by the recent study on categorical properties of latticevalued topology, the paper considers a generalization of the notion of topological system introduced by S. Vickers, providing an algebraic and a coalgebraic category of the new structures. As a result, the nature of the category TopSys of S. Vickers gets clari ed, and a metatheorem is stated, claiming that (latticevalu...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 308 شماره
صفحات -
تاریخ انتشار 2014